package bishi.ruiming;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/09/15 19:53
 */
public class one {
    public static void main(String[] args) {
        one o = new one();
        o.fileWrite("C:\\Users\\Administrator\\Desktop\\面试、算法\\src\\bishi\\ruiming\\Test.txt","我想加入锐明共发展");
    }
    public int fileWrite (String fileName, String text) {
        // write code here
        try{
            File file = new File(fileName);
            FileWriter fw = new FileWriter(file);
            fw.write(text);
            fw.close();
        }catch (IOException e) {
            e.printStackTrace();
        }
        return 0;
    }
}
